import { request } from '@/framework/utils/request-jdz';

/**
 * record-of-operations
 */
export const journalSearch = (params) => {
  // params.notInOptCode = '1007'; // 过滤一些操作码
  return request(
    {
      url: '/common/opt',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
export const journalShow = (id) => {
  return request(
    {
      url: `/common/opt/${id}/detail/`,
      method: 'get',
    },
    {
      isGetDataDirectly: false,
    },
  );
};
/**
 * smart-reminders
 */
export const warnSearch = (params) => {
  return request(
    {
      url: '/caution',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
export const warnDetail = (id) => {
  return request(
    {
      url: `/caution/${id}/detail`,
      method: 'get',
    },
    {
      isGetDataDirectly: false,
    },
  );
};
export const warnHandle = (id, params) => {
  return request(
    {
      url: `/caution/${id}`,
      method: 'put',
      data: params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
